//---------------------------------------------------------------------------

#ifndef CamaraH
#define CamaraH
#include <gl\gl.h>
#include <gl\glu.h>
#include "PV3D.h"
//---------------------------------------------------------------------------
typedef enum{ORTOGONAL,PERSPECTIVA,OBLICUA} Proyeccion;
//---------------------------------------------------------------------------
class Camara
{
 private:
        //Volumen de vista
        double _xL, _xR, _yB, _yT, _zN, _zF;
        double _fovy, _aspect;

        PV3D* _u;
        PV3D* _v;
        PV3D* _n;

        PV3D* _eye;
        PV3D* _up;
        PV3D* _look;

        GLdouble _m[16];

        PV3D* _o;//O de oblicuo

        void calculaNUV();
        void setM();
        void setModelViewMatrix();
 public:
        Camara();
        Camara(double,double,double,double,double,double,double,double,double);
        ~Camara();

        void setView(PV3D*,PV3D*,PV3D*);
        void setView();
        void setProjection(Proyeccion);
        void resize(double,double,double,double,double,double,Proyeccion);
        void roll(double);
        void yaw(double);
        void pitch(double);
        void desliza(PV3D*);

        void giraX(double);
        void giraY(double);
        void giraZ(double);

        void setOblicua(PV3D*);

        void recoloca_camara(PV3D*, PV3D*);

        void traslada(double,double,double);        
};
//---------------------------------------------------------------------------
#endif
